import request from '@/utils/request'
import qs from 'qs';



export function fetchList(params) {
  return request({
    url:'/admin/adminUser/page',
    method:'get',
    params:params
  })
}
export function fetchSelect() {
  return request({
    url:'/admin/adminUser/list',
    method:'get'
  })
}
export function adminUserDetail(id) {
  return request({
    url:'/admin/adminUser/info/'+id,
    method:'get'
  })
}
export function deleteAdminUser(params) {
  return request({
    url:'/admin/adminUser/delete',
    method:'post',
    data:params
  })
}
export function addAdminUser(params) {
  return request({
    url:'/admin/adminUser/saveAdminUser',
    method:'post',
    data:params
  })
}
export function updateAdminUser(params) {
  return request({
    url:'/admin/adminUser/saveAdminUser',
    method:'post',
    data:params
  })
}
export function updateUserRole(params) {
  var params1 = qs.stringify(params,{ arrayFormat: 'repeat' });
  return request({
    url:'/admin/adminUser/updateUserRole',
    method:'post',
    data:params1
  })
}
export function updateUserPassword(params) {
  return request({
    url:'/admin/adminUser/updateUserPassword',
    method:'post',
    params:params
  })
}
export function updateMyPassword(params) {
  return request({
    url:'/admin/adminUser/updateMyPassword',
    method:'post',
    params:params
  })
}
